package com.atguigu.gmall.product;

import com.atguigu.gmall.common.config.Swagger2Config;
import com.atguigu.gmall.common.config.minio.annotation.EnableMinio;
import com.atguigu.gmall.common.config.thread.ThreadPoolAutoConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/*
 * swagger： com.atguigu.gmall.common.config ，和主程序是不同包需要导入
 * @EnableCircuitBreaker+@EnableDiscoveryClient+@SpringBootApplication 等价于 @SpringCloudApplication
 */
@EnableFeignClients(basePackages = {"com.atguigu.gmall.feign.search"})
@EnableTransactionManagement
@EnableMinio
@Import({Swagger2Config.class})
@MapperScan(basePackages = "com.atguigu.gmall.product.mapper")
@SpringCloudApplication //这是一个cloud服务，自动开始服务发现，服务熔断等功能
public class ServiceProductApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServiceProductApplication.class, args);
    }
}
